1. Field of the Invention
The present invention relates to a robot system that operates a robot by using positional information of a workpiece detected by a visual sensor.
2. Description of the Related Art
In order to perform operations such as handling and processing of a workpiece by using a robot, a position at which the workpiece is disposed and a grasping deviation of the workpiece grasped by the robot have to be accurately recognized. For this reason, in recent years, a visual sensor is used for visually recognizing the position of the workpiece and the grasping deviation of the workpiece.
When a camera is attached to a robot arm tip and the position of the workpiece disposed on a table and the like is measured, the position of the workpiece is recognized. In addition, when the position of the workpiece grasped by the robot is measured by a stationary camera, the grasping deviation is recognized.
In order to calculate the position of the workpiece when one of the camera or the workpiece is moved due to operation of the robot as described above, positional information of the robot at the moment of image capture is required. This is because even when the workpiece located at the same position is imaged, the position in the image is changed as the position of the robot to which the camera is attached or the robot grasping the workpiece is changed.
Japanese Patent No. 2889011 discloses a method for calculating a position of a workpiece in an image by using positional information of a robot at the time of image capture. However, when the technique disclosed in Japanese Patent No. 2889011 is actually applied, in order to obtain accurate positional information of the robot at the moment of image capture, the robot has to be temporarily stopped during image capture of the workpiece.
When the robot is temporarily stopped during image capture of the workpiece, there is a problem in that time increases because deceleration time, stop time for capturing the image and obtaining the robot position, reacceleration time and the like of the robot are required. In order to solve this problem, it is desired that the image of the workpiece be captured without stopping the robot and the robot position at the moment of image capture of the workpiece is obtained.
In this connection, a deviation between the time of image capture and the time of obtainment of the robot position may be a problem. For example, if the robot is moving at 2000 mm/sec and the time of image capture deviates from the time of obtainment of the robot position by 1 msec, the robot moves 2 mm between these times. Consequently, positional information of the workpiece included in the image of the workpiece causes an error due to the movement of the robot described above.
Further, assuming that a distance between the camera and the workpiece is 1 m, if posture of the robot varies by 0.1 degrees in 1 msec between the time of image capture and the time of obtainment of the robot position, a measurement error of 1000 mm×tan (0.1)=1.75 mm further occurs. Then, this measurement error is also included in the positional information of the workpiece.
Typically, a robot controller reads angular information of an encoder of a servo motor and the like at a regular cycle such as, for example, at a control cycle of the servo motor to recognize the positional information of the robot. Consequently, accuracy of the positional information of the workpiece measured by the visual sensor depends on this update cycle.
WO 2009/077118 A1 discloses a system for capturing an image of a workpiece during movement of a robot by a camera attached to the robot and correcting a position of the workpiece. However, WO 2009/077118 A1 does not disclose a concrete method for obtaining an accurate robot position at the moment of image capture.
Further, Japanese Patent No. 4174342 discloses a method for capturing an image of a workpiece when a robot transfers the workpiece and correcting a grasping error. However, an error of a robot position resulting from an update cycle of the robot position is not taken into consideration.
Japanese Unexamined Patent Publication No. 2008-183690 discloses a method for sending a trigger signal at the moment of image capture to a control system of a servo motor that updates robot positional information at a shorter cycle and obtaining the robot positional information possessed by the control system. Even in this case, accuracy of the robot positional information depends on a control cycle of the control system of the servo motor. Further, the method disclosed in Japanese Unexamined Patent Publication No. 2008-183690 has a problem in that this method requires dedicated trigger signal line and trigger input/output section.
The present invention has been made in view of these circumstances and it is an object of the present invention to provide a robot system that can obtain an accurate robot position at the moment of image capture without temporarily stopping the robot and without using dedicated hardware.